#pragma once

#include "ImageWrapper.h"
#include "glibplus.h"

class CBufferLoadImage
{
public:
	CBufferLoadImage();
	CBufferLoadImage(const void* pImgData, size_t uLen);
	~CBufferLoadImage();
	
	bool Load(const void* pImgData, size_t uLen);

	Gdiplus::Bitmap* GetImage() const ;

	bool GetImgWrapper(CImageWrapper& imageWrapper);
	bool GetScaleImgWrapper(CImageWrapper& imageWrapper, double dScaleFactor);
private:
	void Clear();
	
	Gdiplus::Bitmap* m_pImage;
	Gdiplus::Bitmap* m_pScaleImage;
	HGLOBAL	m_hBuffer;
};